<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/main.css"/>
    <script type="text/javascript" src="/Public/Admin/js/libs/modernizr.min.js"></script>
    <script src="/Public/Admin/js/libs/jquery.js"></script>
    <script src="/Public/Admin/js/libs/list.js"></script>
    <script src="/Public/Admin/js/libs/allDel.js"></script>
</head>
<body>
<?php echo W("Public/topShow");?>
<div class="container clearfix">
    <?php echo W("Public/sideShow");?>
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo U('InfoManage/index');?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">分类管理</span></div>
        </div>
        <div class="result-wrap">
            <form action="/admin.php/ClassInfo/delClass" method="post">
              <div class="result-title">
                    <div class="result-list">
                      <a href="<?php echo U('ClassInfo/addClass');?>"><i class="icon-font"></i>新增分类</a>
                      <a id="batchDel" href="/admin.php/ClassInfo/delClass"><input type="submit" class="delete"><i class="icon-font"></i>批量删除</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                            <th>ID</th>
                            <th>分类名称</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                        <?php if(is_array($category)): foreach($category as $key=>$categorys): ?><tr  class="userChoose">
                            <td class="tc"><input name="id[]" value="<?php echo ($categorys["id"]); ?>" type="checkbox"></td>
                            <td><?php echo ($categorys["id"]); ?></td>
                            <td><?php echo ($categorys["catname"]); ?></td>
                            <td><?php echo (date("Y-m-d",$categorys["time"])); ?></td>
                            <td>
                              <a class="link-update" href="/admin.php/ClassInfo/modClass?id=<?php echo ($categorys["id"]); ?>">修改</a>
                              <a class="link-del" href="/admin.php/ClassInfo/delClass?id=<?php echo ($categorys["id"]); ?>">删除</a>
                            </td>
                          </tr>
			  <?php if($categorys['child']): if(is_array($categorys['child'])): foreach($categorys['child'] as $key=>$child): ?><tr  class="userChoose">
				<td class="tc"><input name="id[]" value="<?php echo ($child["id"]); ?>" type="checkbox"></td>
				<td><?php echo ($child["id"]); ?></td>
				<td>&nbsp;&nbsp;&nbsp;|-<?php echo ($child["catname"]); ?></td>
				<td><?php echo (date("Y-m-d",$child["time"])); ?></td>
				<td>
				  <a class="link-update" href="/admin.php/ClassInfo/modClass?id=<?php echo ($child["id"]); ?>">修改</a>
				  <a class="link-del" href="/admin.php/ClassInfo/delClass?id=<?php echo ($child["id"]); ?>">删除</a>
				</td>
                              </tr><?php endforeach; endif; endif; endforeach; endif; ?>
                    </table>
                    <div class="list-page"><?php echo ($page); ?></div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>